package com.dnjn.happiness.emo.domain.vo;

import com.dnjn.happiness.emo.domain.UserRecordTaskTimeline;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 任务派发userRecordTask对象 emo_user_record_task
 * 
 * @author amber
 * @date 2024-01-12
 */
@Schema(name = "UserRecordTask1", description = "任务派发userRecordTask")
@Accessors(chain = true)
@ToString
@Getter
@Setter
public class UserRecordTaskVO  implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 已读时间 */
    @Schema(description = "已读时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime dateRead;

    /** 发起人 */
    @Schema(description = "发起人")
    private String initiatorName;

    /** 经度 */
    @Schema(description = "经度")
    private String longitude;

    /** 任务状态 A_APPLIED B_RECEIVED C_CHECKED_IN D_FEEDBACK_GIVEN F_DONE */
    @Schema(description = "任务状态 A_APPLIED(待接收) B_RECEIVED(待打卡) C_CHECKED_IN(待反馈) D_FEEDBACK_GIVEN(待评价) F_DONE(已结束)T_TIMED_OUT(超时)")
    private String taskStatus;

    /** 任务层级<=2 1-主任务 2-支线任务 */
    @Schema(description = "任务层级<=2 1-主任务 2-支线任务")
    private Integer level;

    /** PK */
    @Schema(description = "id",requiredMode=Schema.RequiredMode.NOT_REQUIRED )
    private Long taskId;

    /** 是否删除|0-否 1-是 */
    @Schema(description = "是否删除|0-否 1-是")
    private String deleted;

    /** 附件JSON */
    @Schema(description = "附件JSON")
    private String attachmentJson;

    /** 结束时间 */
    @Schema(description = "结束时间",requiredMode=Schema.RequiredMode.REQUIRED)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime dateDeadline;

    /** 评分 */
    @Schema(description = "评分")
    private Integer taskScore;

    /** 任务内容 */
    @Schema(description = "任务内容",requiredMode=Schema.RequiredMode.REQUIRED)
    private String taskContent;

    /** 交办对象id */
    @Schema(description = "交办对象id",requiredMode=Schema.RequiredMode.REQUIRED)
    private Long userId;

    /** 纬度 */
    @Schema(description = "纬度")
    private String latitude;

    /** 是否已读交办对象点开任务详情页面时更新 Y-N */
    @Schema(description = "是否已读交办对象点开任务详情页面时更新 Y-N")
    private String hasRead;

    /** 发起人id */
    @Schema(description = "发起人id")
    private Long initiatorId;

    /** 任务类型 内勤-INNER 外勤-OUTER */
    @Schema(description = "任务类型 内勤-INNER 外勤-OUTER")
    private String taskType;

    /**  */
    @Schema(description = "父级任务id")
    private Long parentTaskId;

    /** 评价 */
    @Schema(description = "评价")
    private String result;

    /**  */
    @Schema(description = "任务标题")
    private String taskTitle;

    /**  */
    @Schema(description = "")
    private String addressline;

    /** 交办对象 */
    @Schema(description = "交办对象")
    private String userName;

    @Schema(description = "交办对象头像")
    private String userAvatar;

    @Schema(description = "all:全部 ; toBeEvaluated :待评价")
    private String type;

    private List<UserRecordTaskVO> userRecordTasks;

    @Schema(description = "任务详情")
    private List<UserRecordTaskTimeline> userRecordTaskTimelines;

    @Schema(description = "是否有分解任务，根据这个字段显示是否显示主线任务或者支线任务")
    private String yesOrNot;




}
